email me at borlaj@portlandschools.org

Loading
notes previous (14/<14) submit the dump links  
 

Programming in Java for the First Time

 

We are going to type a simple program in notepad:

class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}

			

Save this as HelloWorld.java in a directory on your h: drive

 

Now in the command prompt (Start-run-cmd)

Set the path to the compiler:

type:

path c:\program files\java\jdk1.7.0_17\bin

 

Lets compile the program and then run it.